const List = props => {
    return <p>{props.tasks.join(", ")}</p>;
};

class ToDo extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <div>
                <h1>To Do Lists</h1>
                <h2>Today</h2>
                <List tasks={["find my dog", "find my cat"]} />
                <h2>Tomorrow</h2>
                <List
                    tasks={["find my dog", "find my cat", "by a dog or cat"]}
                />
            </div>
        );
    }
}
